#! /bin/bash

# 整形转Mongo ObjectId

line='000000000000000000000000'

var16=`echo "obase=16;$1" | bc`
printf "%s%s\n" "${line:${#var16}}" $var16

